<?php

namespace app\admin\validate;

use think\Validate;

class Orders extends Validate
{

    /**
     * https://blog.csdn.net/qq_35081380/article/details/123427454
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'name|客户名字' => 'require',
        'email|客户邮箱' => 'require',
        'address|客户地址' => 'require',
        'total_price|订单总额' => 'require',
        'payaccount_id' => 'require|>:0',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [

    ];

    /**
     * 字段描述
     */
    protected $field = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [

     ];
}
